package com.device.controller;

import com.device.util.Message;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.ModelAttribute;

public class BaseController {

	protected static final Message MESSAGE_FAIL = Message.fail("请求错误",new Object[0]);
	protected static final Message MESSAGE_DONE = Message.done("请求成功",new Object[0]);
	
	protected HttpServletRequest request;
	protected HttpServletResponse response;
	
	@ModelAttribute
	public void setReqAndRes(HttpServletRequest req,
			HttpServletResponse res){
		this.request = req; this.response = res;
	}
	
}